<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">System.Console.Haskeline.InputT</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.History.html"><span class="hs-identifier">System.Console.Haskeline.History</span></a></span><span>
</span><span id="line-5"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.History.html"><span class="hs-identifier">System.Console.Haskeline.Command.History</span></a></span><span>
</span><span id="line-6"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.Undo.html"><span class="hs-identifier">System.Console.Haskeline.Command.Undo</span></a></span><span>
</span><span id="line-7"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.KillRing.html"><span class="hs-identifier">System.Console.Haskeline.Command.KillRing</span></a></span><span>
</span><span id="line-8"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html"><span class="hs-identifier">System.Console.Haskeline.Monads</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Monads</span></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Prefs.html"><span class="hs-identifier">System.Console.Haskeline.Prefs</span></a></span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Completion.html"><span class="hs-identifier">System.Console.Haskeline.Completion</span></a></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Backend.html"><span class="hs-identifier">System.Console.Haskeline.Backend</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Term.html"><span class="hs-identifier">System.Console.Haskeline.Term</span></a></span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.Exception.html#IOException"><span class="hs-identifier">IOException</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#"><span class="hs-identifier">Control.Monad.Catch</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#"><span class="hs-identifier">Control.Monad.Fail</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Fail</span></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#"><span class="hs-identifier">Control.Monad.Fix</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.IORef.html#"><span class="hs-identifier">Data.IORef</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../directory/src/System.Directory.html#getHomeDirectory"><span class="hs-identifier">getHomeDirectory</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.html#"><span class="hs-identifier">System.IO</span></a></span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-comment">-- | Application-specific customizations to the user interface.</span><span>
</span><span id="line-24"></span><span class="hs-keyword">data</span><span> </span><span id="Settings"><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-var">Settings</span></a></span></span><span> </span><span id="local-6989586621679097809"><span class="annot"><a href="#local-6989586621679097809"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Settings"><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-var">Settings</span></a></span></span><span> </span><span class="hs-special">{</span><span id="complete"><span class="annot"><span class="annottext">forall (m :: * -&gt; *). Settings m -&gt; CompletionFunc m
</span><a href="System.Console.Haskeline.InputT.html#complete"><span class="hs-identifier hs-var hs-var">complete</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Completion.html#CompletionFunc"><span class="hs-identifier hs-type">CompletionFunc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097809"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- ^ Custom tab completion.</span><span>
</span><span id="line-25"></span><span>                            </span><span id="historyFile"><span class="annot"><span class="annottext">forall (m :: * -&gt; *). Settings m -&gt; Maybe FilePath
</span><a href="System.Console.Haskeline.InputT.html#historyFile"><span class="hs-identifier hs-var hs-var">historyFile</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- ^ Where to read/write the history at the</span><span>
</span><span id="line-26"></span><span>                                                        </span><span class="hs-comment">-- start and end of each</span><span>
</span><span id="line-27"></span><span>                                                        </span><span class="hs-comment">-- line input session.</span><span>
</span><span id="line-28"></span><span>                            </span><span id="autoAddHistory"><span class="annot"><span class="annottext">forall (m :: * -&gt; *). Settings m -&gt; Bool
</span><a href="System.Console.Haskeline.InputT.html#autoAddHistory"><span class="hs-identifier hs-var hs-var">autoAddHistory</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ If 'True', each nonblank line returned by</span><span>
</span><span id="line-29"></span><span>                                </span><span class="hs-comment">-- @getInputLine@ will be automatically added to the history.</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span>                            </span><span class="hs-special">}</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-comment">-- | Because 'complete' is the only field of 'Settings' depending on @m@,</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- the expression @defaultSettings {completionFunc = f}@ leads to a type error</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- from being too general.  This function works around that issue, and may become unnecessary if another field</span><span>
</span><span id="line-36"></span><span class="hs-comment">-- depending on @m@ is added.</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span id="local-6989586621679097802"><span class="annot"><a href="System.Console.Haskeline.InputT.html#setComplete"><span class="hs-identifier hs-type">setComplete</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Completion.html#CompletionFunc"><span class="hs-identifier hs-type">CompletionFunc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097802"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097802"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097802"><span class="hs-identifier hs-type">m</span></a></span></span><span>
</span><span id="line-39"></span><span id="setComplete"><span class="annot"><span class="annottext">setComplete :: forall (m :: * -&gt; *). CompletionFunc m -&gt; Settings m -&gt; Settings m
</span><a href="System.Console.Haskeline.InputT.html#setComplete"><span class="hs-identifier hs-var hs-var">setComplete</span></a></span></span><span> </span><span id="local-6989586621679097533"><span class="annot"><span class="annottext">CompletionFunc m
</span><a href="#local-6989586621679097533"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679097532"><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097532"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097532"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">complete :: CompletionFunc m
</span><a href="System.Console.Haskeline.InputT.html#complete"><span class="hs-identifier hs-var">complete</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompletionFunc m
</span><a href="#local-6989586621679097533"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-comment">-- | A monad transformer which carries all of the state and settings</span><span>
</span><span id="line-43"></span><span class="hs-comment">-- relevant to a line-reading application.</span><span>
</span><span id="line-44"></span><span class="hs-keyword">newtype</span><span> </span><span id="InputT"><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span></span><span> </span><span id="local-6989586621679097800"><span class="annot"><a href="#local-6989586621679097800"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679097799"><span class="annot"><a href="#local-6989586621679097799"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="InputT"><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span></span><span> </span><span class="hs-special">{</span><span id="unInputT"><span class="annot"><span class="annottext">forall (m :: * -&gt; *) a.
InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
</span><a href="System.Console.Haskeline.InputT.html#unInputT"><span class="hs-identifier hs-var hs-var">unInputT</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span>
</span><span id="line-45"></span><span>                                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Term.html#RunTerm"><span class="hs-identifier hs-type">RunTerm</span></a></span><span>
</span><span id="line-46"></span><span>                                </span><span class="hs-comment">-- Use ReaderT (IO _) vs StateT so that exceptions (e.g., ctrl-c)</span><span>
</span><span id="line-47"></span><span>                                </span><span class="hs-comment">-- don't cause us to lose the existing state.</span><span>
</span><span id="line-48"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.History.html#History"><span class="hs-identifier hs-type">History</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.KillRing.html#KillRing"><span class="hs-identifier hs-type">KillRing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Prefs.html#Prefs"><span class="hs-identifier hs-type">Prefs</span></a></span><span>
</span><span id="line-51"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097800"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679097800"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679097799"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-52"></span><span>                            </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679097521"><span id="local-6989586621679097527"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; InputT m a -&gt; InputT m b)
-&gt; (forall a b. a -&gt; InputT m b -&gt; InputT m a)
-&gt; Functor (InputT m)
forall a b. a -&gt; InputT m b -&gt; InputT m a
forall a b. (a -&gt; b) -&gt; InputT m a -&gt; InputT m b
forall (m :: * -&gt; *) a b.
Functor m =&gt;
a -&gt; InputT m b -&gt; InputT m a
forall (m :: * -&gt; *) a b.
Functor m =&gt;
(a -&gt; b) -&gt; InputT m a -&gt; InputT m b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; InputT m b -&gt; InputT m a
$c&lt;$ :: forall (m :: * -&gt; *) a b.
Functor m =&gt;
a -&gt; InputT m b -&gt; InputT m a
fmap :: forall a b. (a -&gt; b) -&gt; InputT m a -&gt; InputT m b
$cfmap :: forall (m :: * -&gt; *) a b.
Functor m =&gt;
(a -&gt; b) -&gt; InputT m a -&gt; InputT m b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679097483"><span id="local-6989586621679097488"><span id="local-6989586621679097493"><span id="local-6989586621679097498"><span id="local-6989586621679097504"><span class="annot"><span class="annottext">Functor (InputT m)
Functor (InputT m)
-&gt; (forall a. a -&gt; InputT m a)
-&gt; (forall a b. InputT m (a -&gt; b) -&gt; InputT m a -&gt; InputT m b)
-&gt; (forall a b c.
    (a -&gt; b -&gt; c) -&gt; InputT m a -&gt; InputT m b -&gt; InputT m c)
-&gt; (forall a b. InputT m a -&gt; InputT m b -&gt; InputT m b)
-&gt; (forall a b. InputT m a -&gt; InputT m b -&gt; InputT m a)
-&gt; Applicative (InputT m)
forall a. a -&gt; InputT m a
forall a b. InputT m a -&gt; InputT m b -&gt; InputT m a
forall a b. InputT m a -&gt; InputT m b -&gt; InputT m b
forall a b. InputT m (a -&gt; b) -&gt; InputT m a -&gt; InputT m b
forall a b c.
(a -&gt; b -&gt; c) -&gt; InputT m a -&gt; InputT m b -&gt; InputT m c
forall (f :: * -&gt; *).
Functor f
-&gt; (forall a. a -&gt; f a)
-&gt; (forall a b. f (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b c. (a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c)
-&gt; (forall a b. f a -&gt; f b -&gt; f b)
-&gt; (forall a b. f a -&gt; f b -&gt; f a)
-&gt; Applicative f
forall {m :: * -&gt; *}. Applicative m =&gt; Functor (InputT m)
forall (m :: * -&gt; *) a. Applicative m =&gt; a -&gt; InputT m a
forall (m :: * -&gt; *) a b.
Applicative m =&gt;
InputT m a -&gt; InputT m b -&gt; InputT m a
forall (m :: * -&gt; *) a b.
Applicative m =&gt;
InputT m a -&gt; InputT m b -&gt; InputT m b
forall (m :: * -&gt; *) a b.
Applicative m =&gt;
InputT m (a -&gt; b) -&gt; InputT m a -&gt; InputT m b
forall (m :: * -&gt; *) a b c.
Applicative m =&gt;
(a -&gt; b -&gt; c) -&gt; InputT m a -&gt; InputT m b -&gt; InputT m c
&lt;* :: forall a b. InputT m a -&gt; InputT m b -&gt; InputT m a
$c&lt;* :: forall (m :: * -&gt; *) a b.
Applicative m =&gt;
InputT m a -&gt; InputT m b -&gt; InputT m a
*&gt; :: forall a b. InputT m a -&gt; InputT m b -&gt; InputT m b
$c*&gt; :: forall (m :: * -&gt; *) a b.
Applicative m =&gt;
InputT m a -&gt; InputT m b -&gt; InputT m b
liftA2 :: forall a b c.
(a -&gt; b -&gt; c) -&gt; InputT m a -&gt; InputT m b -&gt; InputT m c
$cliftA2 :: forall (m :: * -&gt; *) a b c.
Applicative m =&gt;
(a -&gt; b -&gt; c) -&gt; InputT m a -&gt; InputT m b -&gt; InputT m c
&lt;*&gt; :: forall a b. InputT m (a -&gt; b) -&gt; InputT m a -&gt; InputT m b
$c&lt;*&gt; :: forall (m :: * -&gt; *) a b.
Applicative m =&gt;
InputT m (a -&gt; b) -&gt; InputT m a -&gt; InputT m b
pure :: forall a. a -&gt; InputT m a
$cpure :: forall (m :: * -&gt; *) a. Applicative m =&gt; a -&gt; InputT m a
</span><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Applicative</span></a></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679097445"><span id="local-6989586621679097450"><span id="local-6989586621679097456"><span class="annot"><span class="annottext">Applicative (InputT m)
Applicative (InputT m)
-&gt; (forall a b. InputT m a -&gt; (a -&gt; InputT m b) -&gt; InputT m b)
-&gt; (forall a b. InputT m a -&gt; InputT m b -&gt; InputT m b)
-&gt; (forall a. a -&gt; InputT m a)
-&gt; Monad (InputT m)
forall a. a -&gt; InputT m a
forall a b. InputT m a -&gt; InputT m b -&gt; InputT m b
forall a b. InputT m a -&gt; (a -&gt; InputT m b) -&gt; InputT m b
forall {m :: * -&gt; *}. Monad m =&gt; Applicative (InputT m)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; InputT m a
forall (m :: * -&gt; *) a b.
Monad m =&gt;
InputT m a -&gt; InputT m b -&gt; InputT m b
forall (m :: * -&gt; *) a b.
Monad m =&gt;
InputT m a -&gt; (a -&gt; InputT m b) -&gt; InputT m b
forall (m :: * -&gt; *).
Applicative m
-&gt; (forall a b. m a -&gt; (a -&gt; m b) -&gt; m b)
-&gt; (forall a b. m a -&gt; m b -&gt; m b)
-&gt; (forall a. a -&gt; m a)
-&gt; Monad m
return :: forall a. a -&gt; InputT m a
$creturn :: forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; InputT m a
&gt;&gt; :: forall a b. InputT m a -&gt; InputT m b -&gt; InputT m b
$c&gt;&gt; :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
InputT m a -&gt; InputT m b -&gt; InputT m b
&gt;&gt;= :: forall a b. InputT m a -&gt; (a -&gt; InputT m b) -&gt; InputT m b
$c&gt;&gt;= :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
InputT m a -&gt; (a -&gt; InputT m b) -&gt; InputT m b
</span><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Monad</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679097424"><span class="annot"><span class="annottext">Monad (InputT m)
Monad (InputT m)
-&gt; (forall a. IO a -&gt; InputT m a) -&gt; MonadIO (InputT m)
forall a. IO a -&gt; InputT m a
forall (m :: * -&gt; *).
Monad m -&gt; (forall a. IO a -&gt; m a) -&gt; MonadIO m
forall {m :: * -&gt; *}. MonadIO m =&gt; Monad (InputT m)
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; InputT m a
liftIO :: forall a. IO a -&gt; InputT m a
$cliftIO :: forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; InputT m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#C%3AMonadIO"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var">MonadIO</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>                                      </span><span id="local-6989586621679097406"><span class="annot"><span class="annottext">Monad (InputT m)
Monad (InputT m)
-&gt; (forall e a. Exception e =&gt; e -&gt; InputT m a)
-&gt; MonadThrow (InputT m)
forall e a. Exception e =&gt; e -&gt; InputT m a
forall (m :: * -&gt; *).
Monad m -&gt; (forall e a. Exception e =&gt; e -&gt; m a) -&gt; MonadThrow m
forall {m :: * -&gt; *}. MonadThrow m =&gt; Monad (InputT m)
forall (m :: * -&gt; *) e a.
(MonadThrow m, Exception e) =&gt;
e -&gt; InputT m a
throwM :: forall e a. Exception e =&gt; e -&gt; InputT m a
$cthrowM :: forall (m :: * -&gt; *) e a.
(MonadThrow m, Exception e) =&gt;
e -&gt; InputT m a
</span><a href="../../exceptions/src/Control.Monad.Catch.html#C%3AMonadThrow"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var">MonadThrow</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679097386"><span class="annot"><span class="annottext">MonadThrow (InputT m)
MonadThrow (InputT m)
-&gt; (forall e a.
    Exception e =&gt;
    InputT m a -&gt; (e -&gt; InputT m a) -&gt; InputT m a)
-&gt; MonadCatch (InputT m)
forall e a.
Exception e =&gt;
InputT m a -&gt; (e -&gt; InputT m a) -&gt; InputT m a
forall (m :: * -&gt; *).
MonadThrow m
-&gt; (forall e a. Exception e =&gt; m a -&gt; (e -&gt; m a) -&gt; m a)
-&gt; MonadCatch m
forall {m :: * -&gt; *}. MonadCatch m =&gt; MonadThrow (InputT m)
forall (m :: * -&gt; *) e a.
(MonadCatch m, Exception e) =&gt;
InputT m a -&gt; (e -&gt; InputT m a) -&gt; InputT m a
catch :: forall e a.
Exception e =&gt;
InputT m a -&gt; (e -&gt; InputT m a) -&gt; InputT m a
$ccatch :: forall (m :: * -&gt; *) e a.
(MonadCatch m, Exception e) =&gt;
InputT m a -&gt; (e -&gt; InputT m a) -&gt; InputT m a
</span><a href="../../exceptions/src/Control.Monad.Catch.html#C%3AMonadCatch"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var">MonadCatch</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679097357"><span id="local-6989586621679097362"><span id="local-6989586621679097368"><span class="annot"><span class="annottext">MonadCatch (InputT m)
MonadCatch (InputT m)
-&gt; (forall b.
    ((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b)
-&gt; (forall b.
    ((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b)
-&gt; (forall a b c.
    InputT m a
    -&gt; (a -&gt; ExitCase b -&gt; InputT m c)
    -&gt; (a -&gt; InputT m b)
    -&gt; InputT m (b, c))
-&gt; MonadMask (InputT m)
forall b.
((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b
forall a b c.
InputT m a
-&gt; (a -&gt; ExitCase b -&gt; InputT m c)
-&gt; (a -&gt; InputT m b)
-&gt; InputT m (b, c)
forall {m :: * -&gt; *}. MonadMask m =&gt; MonadCatch (InputT m)
forall (m :: * -&gt; *) b.
MonadMask m =&gt;
((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b
forall (m :: * -&gt; *) a b c.
MonadMask m =&gt;
InputT m a
-&gt; (a -&gt; ExitCase b -&gt; InputT m c)
-&gt; (a -&gt; InputT m b)
-&gt; InputT m (b, c)
forall (m :: * -&gt; *).
MonadCatch m
-&gt; (forall b. ((forall a. m a -&gt; m a) -&gt; m b) -&gt; m b)
-&gt; (forall b. ((forall a. m a -&gt; m a) -&gt; m b) -&gt; m b)
-&gt; (forall a b c.
    m a -&gt; (a -&gt; ExitCase b -&gt; m c) -&gt; (a -&gt; m b) -&gt; m (b, c))
-&gt; MonadMask m
generalBracket :: forall a b c.
InputT m a
-&gt; (a -&gt; ExitCase b -&gt; InputT m c)
-&gt; (a -&gt; InputT m b)
-&gt; InputT m (b, c)
$cgeneralBracket :: forall (m :: * -&gt; *) a b c.
MonadMask m =&gt;
InputT m a
-&gt; (a -&gt; ExitCase b -&gt; InputT m c)
-&gt; (a -&gt; InputT m b)
-&gt; InputT m (b, c)
uninterruptibleMask :: forall b.
((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b
$cuninterruptibleMask :: forall (m :: * -&gt; *) b.
MonadMask m =&gt;
((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b
mask :: forall b.
((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b
$cmask :: forall (m :: * -&gt; *) b.
MonadMask m =&gt;
((forall a. InputT m a -&gt; InputT m a) -&gt; InputT m b) -&gt; InputT m b
</span><a href="../../exceptions/src/Control.Monad.Catch.html#C%3AMonadMask"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">MonadMask</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span>                </span><span class="hs-comment">-- NOTE: we're explicitly *not* making InputT an instance of our</span><span>
</span><span id="line-55"></span><span>                </span><span class="hs-comment">-- internal MonadState/MonadReader classes.  Otherwise haddock</span><span>
</span><span id="line-56"></span><span>                </span><span class="hs-comment">-- displays those instances to the user, and it makes it seem like</span><span>
</span><span id="line-57"></span><span>                </span><span class="hs-comment">-- we implement the mtl versions of those classes.</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier hs-type">MonadTrans</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-60"></span><span>    </span><span id="local-6989586621679097323"><span class="annot"><span class="annottext">lift :: forall (m :: * -&gt; *) a. Monad m =&gt; m a -&gt; InputT m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var hs-var hs-var hs-var">lift</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   a
 -&gt; InputT m a)
-&gt; (m a
    -&gt; ReaderT
         RunTerm
         (ReaderT
            (IORef History)
            (ReaderT
               (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
         a)
-&gt; m a
-&gt; InputT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT
  (IORef History)
  (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
  a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef History)
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   a
 -&gt; ReaderT
      RunTerm
      (ReaderT
         (IORef History)
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      a)
-&gt; (m a
    -&gt; ReaderT
         (IORef History)
         (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
         a)
-&gt; m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
 -&gt; ReaderT
      (IORef History)
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      a)
-&gt; (m a
    -&gt; ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; m a
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT Prefs (ReaderT (Settings m) m) a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT Prefs (ReaderT (Settings m) m) a
 -&gt; ReaderT
      (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; (m a -&gt; ReaderT Prefs (ReaderT (Settings m) m) a)
-&gt; m a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (Settings m) m a
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT (Settings m) m a
 -&gt; ReaderT Prefs (ReaderT (Settings m) m) a)
-&gt; (m a -&gt; ReaderT (Settings m) m a)
-&gt; m a
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; ReaderT (Settings m) m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span id="local-6989586621679097684"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097684"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097684"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-63"></span><span>    </span><span id="local-6989586621679097309"><span class="annot"><span class="annottext">fail :: forall a. FilePath -&gt; InputT m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var hs-var hs-var hs-var">fail</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; InputT m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; InputT m a) -&gt; (FilePath -&gt; m a) -&gt; FilePath -&gt; InputT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; m a
forall (m :: * -&gt; *) a. MonadFail m =&gt; FilePath -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">Fail.fail</span></a></span></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span id="local-6989586621679097679"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097679"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097679"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>    </span><span id="local-6989586621679097294"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; InputT m a) -&gt; InputT m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679097293"><span class="annot"><span class="annottext">a -&gt; InputT m a
</span><a href="#local-6989586621679097293"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a
 -&gt; ReaderT
      RunTerm
      (ReaderT
         (IORef History)
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      a)
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (m :: * -&gt; *) a.
InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
</span><a href="System.Console.Haskeline.InputT.html#unInputT"><span class="hs-identifier hs-var hs-var">unInputT</span></a></span><span> </span><span class="annot"><span class="annottext">(InputT m a
 -&gt; ReaderT
      RunTerm
      (ReaderT
         (IORef History)
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      a)
-&gt; (a -&gt; InputT m a)
-&gt; a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; InputT m a
</span><a href="#local-6989586621679097293"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-comment">-- | Run an action in the underlying monad, as per 'lift', passing it a runner</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- function which restores the current 'InputT' context. This can be used in</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- the event that we have some function that takes an action in the underlying</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- monad as an argument (such as 'lift', 'hoist', 'forkIO', etc) and we want</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- to compose it with actions in 'InputT'.</span><span>
</span><span id="line-73"></span><span id="local-6989586621679097673"><span id="local-6989586621679097675"><span class="annot"><a href="System.Console.Haskeline.InputT.html#withRunInBase"><span class="hs-identifier hs-type">withRunInBase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097675"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679097674"><span class="annot"><a href="#local-6989586621679097674"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097675"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097674"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097675"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097674"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097675"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097673"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097675"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097673"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-75"></span><span id="withRunInBase"><span class="annot"><span class="annottext">withRunInBase :: forall (m :: * -&gt; *) b.
Monad m =&gt;
((forall a. InputT m a -&gt; m a) -&gt; m b) -&gt; InputT m b
</span><a href="System.Console.Haskeline.InputT.html#withRunInBase"><span class="hs-identifier hs-var hs-var">withRunInBase</span></a></span></span><span> </span><span id="local-6989586621679097254"><span class="annot"><span class="annottext">(forall a. InputT m a -&gt; m a) -&gt; m b
</span><a href="#local-6989586621679097254"><span class="hs-identifier hs-var">inner</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  b
-&gt; InputT m b
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   b
 -&gt; InputT m b)
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     b
-&gt; InputT m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-76"></span><span>    </span><span id="local-6989586621679097253"><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679097253"><span class="hs-identifier hs-var">runTerm</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  RunTerm
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-77"></span><span>    </span><span id="local-6989586621679097251"><span class="annot"><span class="annottext">IORef History
</span><a href="#local-6989586621679097251"><span class="hs-identifier hs-var">history</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  (IORef History)
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span id="local-6989586621679097250"><span class="annot"><span class="annottext">IORef KillRing
</span><a href="#local-6989586621679097250"><span class="hs-identifier hs-var">killRing</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  (IORef KillRing)
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span id="local-6989586621679097249"><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097249"><span class="hs-identifier hs-var">prefs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  Prefs
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-80"></span><span>    </span><span id="local-6989586621679097248"><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097248"><span class="hs-identifier hs-var">settings</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  (Settings m)
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-81"></span><span>    </span><span class="annot"><span class="annottext">ReaderT
  (IORef History)
  (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
  b
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     b
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef History)
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   b
 -&gt; ReaderT
      RunTerm
      (ReaderT
         (IORef History)
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      b)
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     b
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) b
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     b
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) b
 -&gt; ReaderT
      (IORef History)
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      b)
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) b
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT Prefs (ReaderT (Settings m) m) b
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) b
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT Prefs (ReaderT (Settings m) m) b
 -&gt; ReaderT
      (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) b)
-&gt; ReaderT Prefs (ReaderT (Settings m) m) b
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (Settings m) m b
-&gt; ReaderT Prefs (ReaderT (Settings m) m) b
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT (Settings m) m b
 -&gt; ReaderT Prefs (ReaderT (Settings m) m) b)
-&gt; ReaderT (Settings m) m b
-&gt; ReaderT Prefs (ReaderT (Settings m) m) b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m b -&gt; ReaderT (Settings m) m b
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m b -&gt; ReaderT (Settings m) m b)
-&gt; m b -&gt; ReaderT (Settings m) m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(forall a. InputT m a -&gt; m a) -&gt; m b
</span><a href="#local-6989586621679097254"><span class="hs-identifier hs-var">inner</span></a></span><span> </span><span class="annot"><span class="annottext">((forall a. InputT m a -&gt; m a) -&gt; m b)
-&gt; (forall a. InputT m a -&gt; m a) -&gt; m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-82"></span><span>        </span><span class="annot"><span class="annottext">(ReaderT (Settings m) m a -&gt; Settings m -&gt; m a)
-&gt; Settings m -&gt; ReaderT (Settings m) m a -&gt; m a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (Settings m) m a -&gt; Settings m -&gt; m a
forall r (m :: * -&gt; *) a. ReaderT r m a -&gt; r -&gt; m a
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier hs-var hs-var">runReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097248"><span class="hs-identifier hs-var">settings</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT (Settings m) m a -&gt; m a)
-&gt; (InputT m a -&gt; ReaderT (Settings m) m a) -&gt; InputT m a -&gt; m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-83"></span><span>        </span><span class="annot"><span class="annottext">(ReaderT Prefs (ReaderT (Settings m) m) a
 -&gt; Prefs -&gt; ReaderT (Settings m) m a)
-&gt; Prefs
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
-&gt; ReaderT (Settings m) m a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT Prefs (ReaderT (Settings m) m) a
-&gt; Prefs -&gt; ReaderT (Settings m) m a
forall r (m :: * -&gt; *) a. ReaderT r m a -&gt; r -&gt; m a
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier hs-var hs-var">runReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097249"><span class="hs-identifier hs-var">prefs</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT Prefs (ReaderT (Settings m) m) a
 -&gt; ReaderT (Settings m) m a)
-&gt; (InputT m a -&gt; ReaderT Prefs (ReaderT (Settings m) m) a)
-&gt; InputT m a
-&gt; ReaderT (Settings m) m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-84"></span><span>        </span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
 -&gt; IORef KillRing -&gt; ReaderT Prefs (ReaderT (Settings m) m) a)
-&gt; IORef KillRing
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; IORef KillRing -&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall r (m :: * -&gt; *) a. ReaderT r m a -&gt; r -&gt; m a
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier hs-var hs-var">runReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">IORef KillRing
</span><a href="#local-6989586621679097250"><span class="hs-identifier hs-var">killRing</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
 -&gt; ReaderT Prefs (ReaderT (Settings m) m) a)
-&gt; (InputT m a
    -&gt; ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; InputT m a
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-85"></span><span>        </span><span class="annot"><span class="annottext">(ReaderT
   (IORef History)
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   a
 -&gt; IORef History
 -&gt; ReaderT
      (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; IORef History
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT
  (IORef History)
  (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
  a
-&gt; IORef History
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall r (m :: * -&gt; *) a. ReaderT r m a -&gt; r -&gt; m a
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier hs-var hs-var">runReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">IORef History
</span><a href="#local-6989586621679097251"><span class="hs-identifier hs-var">history</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef History)
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   a
 -&gt; ReaderT
      (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; (InputT m a
    -&gt; ReaderT
         (IORef History)
         (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
         a)
-&gt; InputT m a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-86"></span><span>        </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   a
 -&gt; RunTerm
 -&gt; ReaderT
      (IORef History)
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      a)
-&gt; RunTerm
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; RunTerm
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall r (m :: * -&gt; *) a. ReaderT r m a -&gt; r -&gt; m a
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier hs-var hs-var">runReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679097253"><span class="hs-identifier hs-var">runTerm</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   a
 -&gt; ReaderT
      (IORef History)
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      a)
-&gt; (InputT m a
    -&gt; ReaderT
         RunTerm
         (ReaderT
            (IORef History)
            (ReaderT
               (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
         a)
-&gt; InputT m a
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-87"></span><span>        </span><span class="annot"><span class="annottext">InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (m :: * -&gt; *) a.
InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
</span><a href="System.Console.Haskeline.InputT.html#unInputT"><span class="hs-identifier hs-var hs-var">unInputT</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | Get the current line input history.</span><span>
</span><span id="line-90"></span><span id="local-6989586621679097652"><span class="annot"><a href="System.Console.Haskeline.InputT.html#getHistory"><span class="hs-identifier hs-type">getHistory</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097652"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097652"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.History.html#History"><span class="hs-identifier hs-type">History</span></a></span></span><span>
</span><span id="line-91"></span><span id="getHistory"><span class="annot"><span class="annottext">getHistory :: forall (m :: * -&gt; *). MonadIO m =&gt; InputT m History
</span><a href="System.Console.Haskeline.InputT.html#getHistory"><span class="hs-identifier hs-var hs-var">getHistory</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  History
-&gt; InputT m History
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  History
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-comment">-- | Set the line input history.</span><span>
</span><span id="line-94"></span><span id="local-6989586621679097642"><span class="annot"><a href="System.Console.Haskeline.InputT.html#putHistory"><span class="hs-identifier hs-type">putHistory</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097642"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.History.html#History"><span class="hs-identifier hs-type">History</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097642"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-95"></span><span id="putHistory"><span class="annot"><span class="annottext">putHistory :: forall (m :: * -&gt; *). MonadIO m =&gt; History -&gt; InputT m ()
</span><a href="System.Console.Haskeline.InputT.html#putHistory"><span class="hs-identifier hs-var hs-var">putHistory</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  ()
-&gt; InputT m ()
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   ()
 -&gt; InputT m ())
-&gt; (History
    -&gt; ReaderT
         RunTerm
         (ReaderT
            (IORef History)
            (ReaderT
               (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
         ())
-&gt; History
-&gt; InputT m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">History
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     ()
forall s (m :: * -&gt; *). MonadState s m =&gt; s -&gt; m ()
</span><a href="System.Console.Haskeline.Monads.html#put"><span class="hs-identifier hs-var">put</span></a></span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span class="hs-comment">-- | Change the current line input history.</span><span>
</span><span id="line-98"></span><span id="local-6989586621679097640"><span class="annot"><a href="System.Console.Haskeline.InputT.html#modifyHistory"><span class="hs-identifier hs-type">modifyHistory</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097640"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.History.html#History"><span class="hs-identifier hs-type">History</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.History.html#History"><span class="hs-identifier hs-type">History</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097640"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-99"></span><span id="modifyHistory"><span class="annot"><span class="annottext">modifyHistory :: forall (m :: * -&gt; *).
MonadIO m =&gt;
(History -&gt; History) -&gt; InputT m ()
</span><a href="System.Console.Haskeline.InputT.html#modifyHistory"><span class="hs-identifier hs-var hs-var">modifyHistory</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  ()
-&gt; InputT m ()
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   ()
 -&gt; InputT m ())
-&gt; ((History -&gt; History)
    -&gt; ReaderT
         RunTerm
         (ReaderT
            (IORef History)
            (ReaderT
               (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
         ())
-&gt; (History -&gt; History)
-&gt; InputT m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(History -&gt; History)
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     ()
forall s (m :: * -&gt; *). MonadState s m =&gt; (s -&gt; s) -&gt; m ()
</span><a href="System.Console.Haskeline.Monads.html#modify"><span class="hs-identifier hs-var">modify</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- for internal use only</span><span>
</span><span id="line-102"></span><span class="hs-keyword">type</span><span> </span><span id="InputCmdT"><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputCmdT"><span class="hs-identifier hs-var">InputCmdT</span></a></span></span><span> </span><span id="local-6989586621679097198"><span class="annot"><a href="#local-6989586621679097198"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#StateT"><span class="hs-identifier hs-type">StateT</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Term.html#Layout"><span class="hs-identifier hs-type">Layout</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.Undo.html#UndoT"><span class="hs-identifier hs-type">UndoT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#StateT"><span class="hs-identifier hs-type">StateT</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.History.html#HistLog"><span class="hs-identifier hs-type">HistLog</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.KillRing.html#KillRing"><span class="hs-identifier hs-type">KillRing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>                        </span><span class="hs-comment">-- HistLog can be just StateT, since its final state</span><span>
</span><span id="line-104"></span><span>                        </span><span class="hs-comment">-- isn't used outside of InputCmdT.</span><span>
</span><span id="line-105"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Prefs.html#Prefs"><span class="hs-identifier hs-type">Prefs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097198"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679097198"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span id="local-6989586621679097634"><span id="local-6989586621679097636"><span class="annot"><a href="System.Console.Haskeline.InputT.html#runInputCmdT"><span class="hs-identifier hs-type">runInputCmdT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097636"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Term.html#TermOps"><span class="hs-identifier hs-type">TermOps</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputCmdT"><span class="hs-identifier hs-type">InputCmdT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097636"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097634"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097636"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097634"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-108"></span><span id="runInputCmdT"><span class="annot"><span class="annottext">runInputCmdT :: forall (m :: * -&gt; *) a.
MonadIO m =&gt;
TermOps -&gt; InputCmdT m a -&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#runInputCmdT"><span class="hs-identifier hs-var hs-var">runInputCmdT</span></a></span></span><span> </span><span id="local-6989586621679097172"><span class="annot"><span class="annottext">TermOps
</span><a href="#local-6989586621679097172"><span class="hs-identifier hs-var">tops</span></a></span></span><span> </span><span id="local-6989586621679097171"><span class="annot"><span class="annottext">InputCmdT m a
</span><a href="#local-6989586621679097171"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   a
 -&gt; InputT m a)
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
-&gt; InputT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-109"></span><span>    </span><span id="local-6989586621679097170"><span class="annot"><span class="annottext">Layout
</span><a href="#local-6989586621679097170"><span class="hs-identifier hs-var">layout</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Layout
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     Layout
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Layout
 -&gt; ReaderT
      RunTerm
      (ReaderT
         (IORef History)
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      Layout)
-&gt; IO Layout
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     Layout
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TermOps -&gt; IO Layout
</span><a href="System.Console.Haskeline.Term.html#getLayout"><span class="hs-identifier hs-var hs-var">getLayout</span></a></span><span> </span><span class="annot"><span class="annottext">TermOps
</span><a href="#local-6989586621679097172"><span class="hs-identifier hs-var">tops</span></a></span><span>
</span><span id="line-110"></span><span>    </span><span id="local-6989586621679097167"><span class="annot"><span class="annottext">History
</span><a href="#local-6989586621679097167"><span class="hs-identifier hs-var">history</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  History
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-111"></span><span>    </span><span class="annot"><span class="annottext">ReaderT
  (IORef History)
  (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
  a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef History)
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   a
 -&gt; ReaderT
      RunTerm
      (ReaderT
         (IORef History)
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      a)
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
 -&gt; ReaderT
      (IORef History)
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      a)
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HistLog
-&gt; StateT
     HistLog
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall (m :: * -&gt; *) s a. Monad m =&gt; s -&gt; StateT s m a -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#evalStateT%27"><span class="hs-identifier hs-var">evalStateT'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">History -&gt; HistLog
</span><a href="System.Console.Haskeline.Command.History.html#histLog"><span class="hs-identifier hs-var">histLog</span></a></span><span> </span><span class="annot"><span class="annottext">History
</span><a href="#local-6989586621679097167"><span class="hs-identifier hs-var">history</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(StateT
   HistLog
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   a
 -&gt; ReaderT
      (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; StateT
     HistLog
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UndoT
  (StateT
     HistLog
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; StateT
     HistLog
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall (m :: * -&gt; *) a. Monad m =&gt; UndoT m a -&gt; m a
</span><a href="System.Console.Haskeline.Command.Undo.html#runUndoT"><span class="hs-identifier hs-var">runUndoT</span></a></span><span> </span><span class="annot"><span class="annottext">(UndoT
   (StateT
      HistLog
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   a
 -&gt; StateT
      HistLog
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      a)
-&gt; UndoT
     (StateT
        HistLog
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
-&gt; StateT
     HistLog
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Layout
-&gt; InputCmdT m a
-&gt; UndoT
     (StateT
        HistLog
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (m :: * -&gt; *) s a. Monad m =&gt; s -&gt; StateT s m a -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#evalStateT%27"><span class="hs-identifier hs-var">evalStateT'</span></a></span><span> </span><span class="annot"><span class="annottext">Layout
</span><a href="#local-6989586621679097170"><span class="hs-identifier hs-var">layout</span></a></span><span> </span><span class="annot"><span class="annottext">InputCmdT m a
</span><a href="#local-6989586621679097171"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span id="local-6989586621679097607"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097607"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097607"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Term.html#CommandMonad"><span class="hs-identifier hs-type">CommandMonad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputCmdT"><span class="hs-identifier hs-type">InputCmdT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097607"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-114"></span><span>    </span><span id="local-6989586621679097087"><span class="annot"><span class="annottext">runCompletion :: (FilePath, FilePath) -&gt; InputCmdT m (FilePath, [Completion])
</span><a href="System.Console.Haskeline.Term.html#runCompletion"><span class="hs-identifier hs-var hs-var hs-var hs-var">runCompletion</span></a></span></span><span> </span><span id="local-6989586621679097085"><span class="annot"><span class="annottext">(FilePath, FilePath)
</span><a href="#local-6989586621679097085"><span class="hs-identifier hs-var">lcs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-115"></span><span>        </span><span id="local-6989586621679097084"><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097084"><span class="hs-identifier hs-var">settings</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">StateT
  Layout
  (StateT
     Undo
     (StateT
        HistLog
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))))
  (Settings m)
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-116"></span><span>        </span><span class="annot"><span class="annottext">StateT
  Undo
  (StateT
     HistLog
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  (FilePath, [Completion])
-&gt; InputCmdT m (FilePath, [Completion])
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(StateT
   Undo
   (StateT
      HistLog
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   (FilePath, [Completion])
 -&gt; InputCmdT m (FilePath, [Completion]))
-&gt; StateT
     Undo
     (StateT
        HistLog
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     (FilePath, [Completion])
-&gt; InputCmdT m (FilePath, [Completion])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">StateT
  HistLog
  (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
  (FilePath, [Completion])
-&gt; StateT
     Undo
     (StateT
        HistLog
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     (FilePath, [Completion])
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(StateT
   HistLog
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   (FilePath, [Completion])
 -&gt; StateT
      Undo
      (StateT
         HistLog
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      (FilePath, [Completion]))
-&gt; StateT
     HistLog
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     (FilePath, [Completion])
-&gt; StateT
     Undo
     (StateT
        HistLog
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     (FilePath, [Completion])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT
  (IORef KillRing)
  (ReaderT Prefs (ReaderT (Settings m) m))
  (FilePath, [Completion])
-&gt; StateT
     HistLog
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     (FilePath, [Completion])
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing)
   (ReaderT Prefs (ReaderT (Settings m) m))
   (FilePath, [Completion])
 -&gt; StateT
      HistLog
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      (FilePath, [Completion]))
-&gt; ReaderT
     (IORef KillRing)
     (ReaderT Prefs (ReaderT (Settings m) m))
     (FilePath, [Completion])
-&gt; StateT
     HistLog
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     (FilePath, [Completion])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT Prefs (ReaderT (Settings m) m) (FilePath, [Completion])
-&gt; ReaderT
     (IORef KillRing)
     (ReaderT Prefs (ReaderT (Settings m) m))
     (FilePath, [Completion])
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT Prefs (ReaderT (Settings m) m) (FilePath, [Completion])
 -&gt; ReaderT
      (IORef KillRing)
      (ReaderT Prefs (ReaderT (Settings m) m))
      (FilePath, [Completion]))
-&gt; ReaderT Prefs (ReaderT (Settings m) m) (FilePath, [Completion])
-&gt; ReaderT
     (IORef KillRing)
     (ReaderT Prefs (ReaderT (Settings m) m))
     (FilePath, [Completion])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (Settings m) m (FilePath, [Completion])
-&gt; ReaderT Prefs (ReaderT (Settings m) m) (FilePath, [Completion])
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT (Settings m) m (FilePath, [Completion])
 -&gt; ReaderT Prefs (ReaderT (Settings m) m) (FilePath, [Completion]))
-&gt; ReaderT (Settings m) m (FilePath, [Completion])
-&gt; ReaderT Prefs (ReaderT (Settings m) m) (FilePath, [Completion])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m (FilePath, [Completion])
-&gt; ReaderT (Settings m) m (FilePath, [Completion])
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m (FilePath, [Completion])
 -&gt; ReaderT (Settings m) m (FilePath, [Completion]))
-&gt; m (FilePath, [Completion])
-&gt; ReaderT (Settings m) m (FilePath, [Completion])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Settings m -&gt; CompletionFunc m
forall (m :: * -&gt; *). Settings m -&gt; CompletionFunc m
</span><a href="System.Console.Haskeline.InputT.html#complete"><span class="hs-identifier hs-var hs-var">complete</span></a></span><span> </span><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097084"><span class="hs-identifier hs-var">settings</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath, FilePath)
</span><a href="#local-6989586621679097085"><span class="hs-identifier hs-var">lcs</span></a></span></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-comment">-- | Run a line-reading application.  Uses 'defaultBehavior' to determine the</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- interaction behavior.</span><span>
</span><span id="line-120"></span><span id="local-6989586621679097605"><span id="local-6989586621679097606"><span class="annot"><a href="System.Console.Haskeline.InputT.html#runInputTWithPrefs"><span class="hs-identifier hs-type">runInputTWithPrefs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097606"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097606"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Prefs.html#Prefs"><span class="hs-identifier hs-type">Prefs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097606"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097606"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097605"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097606"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097605"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-121"></span><span id="runInputTWithPrefs"><span class="annot"><span class="annottext">runInputTWithPrefs :: forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Prefs -&gt; Settings m -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#runInputTWithPrefs"><span class="hs-identifier hs-var hs-var">runInputTWithPrefs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Behavior -&gt; Prefs -&gt; Settings m -&gt; InputT m a -&gt; m a
forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Behavior -&gt; Prefs -&gt; Settings m -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#runInputTBehaviorWithPrefs"><span class="hs-identifier hs-var">runInputTBehaviorWithPrefs</span></a></span><span> </span><span class="annot"><span class="annottext">Behavior
</span><a href="System.Console.Haskeline.InputT.html#defaultBehavior"><span class="hs-identifier hs-var">defaultBehavior</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- | Run a line-reading application.  This function should suffice for most applications.</span><span>
</span><span id="line-124"></span><span class="hs-comment">--</span><span>
</span><span id="line-125"></span><span class="hs-comment">-- This function is equivalent to @'runInputTBehavior' 'defaultBehavior'@.  It </span><span>
</span><span id="line-126"></span><span class="hs-comment">-- uses terminal-style interaction if 'stdin' is connected to a terminal and has</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- echoing enabled.  Otherwise (e.g., if 'stdin' is a pipe), it uses file-style interaction.</span><span>
</span><span id="line-128"></span><span class="hs-comment">--</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- If it uses terminal-style interaction, 'Prefs' will be read from the user's @~/.haskeline@ file</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- (if present).</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- If it uses file-style interaction, 'Prefs' are not relevant and will not be read.</span><span>
</span><span id="line-132"></span><span id="local-6989586621679097598"><span id="local-6989586621679097599"><span class="annot"><a href="System.Console.Haskeline.InputT.html#runInputT"><span class="hs-identifier hs-type">runInputT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097599"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097599"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097599"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097599"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097598"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097599"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097598"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-133"></span><span id="runInputT"><span class="annot"><span class="annottext">runInputT :: forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Settings m -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#runInputT"><span class="hs-identifier hs-var hs-var">runInputT</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Behavior -&gt; Settings m -&gt; InputT m a -&gt; m a
forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Behavior -&gt; Settings m -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#runInputTBehavior"><span class="hs-identifier hs-var">runInputTBehavior</span></a></span><span> </span><span class="annot"><span class="annottext">Behavior
</span><a href="System.Console.Haskeline.InputT.html#defaultBehavior"><span class="hs-identifier hs-var">defaultBehavior</span></a></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="hs-comment">-- | Returns 'True' if the current session uses terminal-style interaction.  (See 'Behavior'.)</span><span>
</span><span id="line-136"></span><span id="local-6989586621679097593"><span class="annot"><a href="System.Console.Haskeline.InputT.html#haveTerminalUI"><span class="hs-identifier hs-type">haveTerminalUI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097593"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097593"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-137"></span><span id="haveTerminalUI"><span class="annot"><span class="annottext">haveTerminalUI :: forall (m :: * -&gt; *). Monad m =&gt; InputT m Bool
</span><a href="System.Console.Haskeline.InputT.html#haveTerminalUI"><span class="hs-identifier hs-var hs-var">haveTerminalUI</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  Bool
-&gt; InputT m Bool
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   Bool
 -&gt; InputT m Bool)
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     Bool
-&gt; InputT m Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(RunTerm -&gt; Bool)
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     Bool
forall r (m :: * -&gt; *) a. MonadReader r m =&gt; (r -&gt; a) -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#asks"><span class="hs-identifier hs-var">asks</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm -&gt; Bool
</span><a href="System.Console.Haskeline.Term.html#isTerminalStyle"><span class="hs-identifier hs-var">isTerminalStyle</span></a></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="hs-comment">{- | Haskeline has two ways of interacting with the user:

 * \&quot;Terminal-style\&quot; interaction provides an rich user interface by connecting
   to the user's terminal (which may be different than 'stdin' or 'stdout').  
 
 * \&quot;File-style\&quot; interaction treats the input as a simple stream of characters, for example
    when reading from a file or pipe.  Input functions (e.g., @getInputLine@) print the prompt to 'stdout'.
 
 A 'Behavior' is a method for deciding at run-time which type of interaction to use.  
 
 For most applications (e.g., a REPL), 'defaultBehavior' should have the correct effect.
-}</span><span>
</span><span id="line-152"></span><span class="hs-keyword">data</span><span> </span><span id="Behavior"><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-var">Behavior</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Behavior"><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-var">Behavior</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Term.html#RunTerm"><span class="hs-identifier hs-type">RunTerm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="hs-comment">-- | Create and use a RunTerm, ensuring that it will be closed even if</span><span>
</span><span id="line-155"></span><span class="hs-comment">-- an async exception occurs during the creation or use.</span><span>
</span><span id="line-156"></span><span id="local-6989586621679097587"><span id="local-6989586621679097588"><span class="annot"><a href="System.Console.Haskeline.InputT.html#withBehavior"><span class="hs-identifier hs-type">withBehavior</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097588"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097588"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Term.html#RunTerm"><span class="hs-identifier hs-type">RunTerm</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097588"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097587"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097588"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097587"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-157"></span><span id="withBehavior"><span class="annot"><span class="annottext">withBehavior :: forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Behavior -&gt; (RunTerm -&gt; m a) -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#withBehavior"><span class="hs-identifier hs-var hs-var">withBehavior</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span> </span><span id="local-6989586621679097054"><span class="annot"><span class="annottext">IO RunTerm
</span><a href="#local-6989586621679097054"><span class="hs-identifier hs-var">run</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679097053"><span class="annot"><span class="annottext">RunTerm -&gt; m a
</span><a href="#local-6989586621679097053"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m RunTerm -&gt; (RunTerm -&gt; m ()) -&gt; (RunTerm -&gt; m a) -&gt; m a
forall (m :: * -&gt; *) a c b.
MonadMask m =&gt;
m a -&gt; (a -&gt; m c) -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../exceptions/src/Control.Monad.Catch.html#bracket"><span class="hs-identifier hs-var">bracket</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IO RunTerm -&gt; m RunTerm
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">IO RunTerm
</span><a href="#local-6989586621679097054"><span class="hs-identifier hs-var">run</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IO () -&gt; m ()
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; m ()) -&gt; (RunTerm -&gt; IO ()) -&gt; RunTerm -&gt; m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm -&gt; IO ()
</span><a href="System.Console.Haskeline.Term.html#closeTerm"><span class="hs-identifier hs-var hs-var">closeTerm</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RunTerm -&gt; m a
</span><a href="#local-6989586621679097053"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="hs-comment">-- | Run a line-reading application according to the given behavior.</span><span>
</span><span id="line-160"></span><span class="hs-comment">--</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- If it uses terminal-style interaction, 'Prefs' will be read from the</span><span>
</span><span id="line-162"></span><span class="hs-comment">-- user's @~/.haskeline@ file (if present).</span><span>
</span><span id="line-163"></span><span class="hs-comment">-- If it uses file-style interaction, 'Prefs' are not relevant and will not be read.</span><span>
</span><span id="line-164"></span><span id="local-6989586621679097594"><span id="local-6989586621679097595"><span class="annot"><a href="System.Console.Haskeline.InputT.html#runInputTBehavior"><span class="hs-identifier hs-type">runInputTBehavior</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097595"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097595"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097595"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097595"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097594"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097595"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097594"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-165"></span><span id="runInputTBehavior"><span class="annot"><span class="annottext">runInputTBehavior :: forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Behavior -&gt; Settings m -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#runInputTBehavior"><span class="hs-identifier hs-var hs-var">runInputTBehavior</span></a></span></span><span> </span><span id="local-6989586621679097040"><span class="annot"><span class="annottext">Behavior
</span><a href="#local-6989586621679097040"><span class="hs-identifier hs-var">behavior</span></a></span></span><span> </span><span id="local-6989586621679097039"><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097039"><span class="hs-identifier hs-var">settings</span></a></span></span><span> </span><span id="local-6989586621679097038"><span class="annot"><span class="annottext">InputT m a
</span><a href="#local-6989586621679097038"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Behavior -&gt; (RunTerm -&gt; m a) -&gt; m a
forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Behavior -&gt; (RunTerm -&gt; m a) -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#withBehavior"><span class="hs-identifier hs-var">withBehavior</span></a></span><span> </span><span class="annot"><span class="annottext">Behavior
</span><a href="#local-6989586621679097040"><span class="hs-identifier hs-var">behavior</span></a></span><span> </span><span class="annot"><span class="annottext">((RunTerm -&gt; m a) -&gt; m a) -&gt; (RunTerm -&gt; m a) -&gt; m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679097037"><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679097037"><span class="hs-identifier hs-var">run</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-166"></span><span>    </span><span id="local-6989586621679097036"><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097036"><span class="hs-identifier hs-var">prefs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RunTerm -&gt; Bool
</span><a href="System.Console.Haskeline.Term.html#isTerminalStyle"><span class="hs-identifier hs-var">isTerminalStyle</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679097037"><span class="hs-identifier hs-var">run</span></a></span><span>
</span><span id="line-167"></span><span>                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO Prefs -&gt; m Prefs
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">IO Prefs
</span><a href="System.Console.Haskeline.InputT.html#readPrefsFromHome"><span class="hs-identifier hs-var">readPrefsFromHome</span></a></span><span>
</span><span id="line-168"></span><span>                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Prefs -&gt; m Prefs
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
</span><a href="System.Console.Haskeline.Prefs.html#defaultPrefs"><span class="hs-identifier hs-var">defaultPrefs</span></a></span><span>
</span><span id="line-169"></span><span>    </span><span class="annot"><span class="annottext">Prefs -&gt; Settings m -&gt; RunTerm -&gt; InputT m a -&gt; m a
forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Prefs -&gt; Settings m -&gt; RunTerm -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#execInputT"><span class="hs-identifier hs-var">execInputT</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097036"><span class="hs-identifier hs-var">prefs</span></a></span><span> </span><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097039"><span class="hs-identifier hs-var">settings</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679097037"><span class="hs-identifier hs-var">run</span></a></span><span> </span><span class="annot"><span class="annottext">InputT m a
</span><a href="#local-6989586621679097038"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span class="hs-comment">-- | Run a line-reading application.</span><span>
</span><span id="line-172"></span><span id="local-6989586621679097600"><span id="local-6989586621679097601"><span class="annot"><a href="System.Console.Haskeline.InputT.html#runInputTBehaviorWithPrefs"><span class="hs-identifier hs-type">runInputTBehaviorWithPrefs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097601"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097601"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Prefs.html#Prefs"><span class="hs-identifier hs-type">Prefs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097601"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097601"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097600"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097601"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097600"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-174"></span><span id="runInputTBehaviorWithPrefs"><span class="annot"><span class="annottext">runInputTBehaviorWithPrefs :: forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Behavior -&gt; Prefs -&gt; Settings m -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#runInputTBehaviorWithPrefs"><span class="hs-identifier hs-var hs-var">runInputTBehaviorWithPrefs</span></a></span></span><span> </span><span id="local-6989586621679097026"><span class="annot"><span class="annottext">Behavior
</span><a href="#local-6989586621679097026"><span class="hs-identifier hs-var">behavior</span></a></span></span><span> </span><span id="local-6989586621679097025"><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097025"><span class="hs-identifier hs-var">prefs</span></a></span></span><span> </span><span id="local-6989586621679097024"><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097024"><span class="hs-identifier hs-var">settings</span></a></span></span><span> </span><span id="local-6989586621679097023"><span class="annot"><span class="annottext">InputT m a
</span><a href="#local-6989586621679097023"><span class="hs-identifier hs-var">f</span></a></span></span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Behavior -&gt; (RunTerm -&gt; m a) -&gt; m a
forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Behavior -&gt; (RunTerm -&gt; m a) -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#withBehavior"><span class="hs-identifier hs-var">withBehavior</span></a></span><span> </span><span class="annot"><span class="annottext">Behavior
</span><a href="#local-6989586621679097026"><span class="hs-identifier hs-var">behavior</span></a></span><span> </span><span class="annot"><span class="annottext">((RunTerm -&gt; m a) -&gt; m a) -&gt; (RunTerm -&gt; m a) -&gt; m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(RunTerm -&gt; InputT m a -&gt; m a) -&gt; InputT m a -&gt; RunTerm -&gt; m a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prefs -&gt; Settings m -&gt; RunTerm -&gt; InputT m a -&gt; m a
forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Prefs -&gt; Settings m -&gt; RunTerm -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#execInputT"><span class="hs-identifier hs-var">execInputT</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097025"><span class="hs-identifier hs-var">prefs</span></a></span><span> </span><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097024"><span class="hs-identifier hs-var">settings</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InputT m a
</span><a href="#local-6989586621679097023"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-comment">-- | Helper function to feed the parameters into an InputT.</span><span>
</span><span id="line-178"></span><span id="local-6989586621679097577"><span id="local-6989586621679097578"><span class="annot"><a href="System.Console.Haskeline.InputT.html#execInputT"><span class="hs-identifier hs-type">execInputT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097578"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097578"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Prefs.html#Prefs"><span class="hs-identifier hs-type">Prefs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097578"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Term.html#RunTerm"><span class="hs-identifier hs-type">RunTerm</span></a></span><span>
</span><span id="line-179"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097578"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097577"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097578"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097577"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-180"></span><span id="execInputT"><span class="annot"><span class="annottext">execInputT :: forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Prefs -&gt; Settings m -&gt; RunTerm -&gt; InputT m a -&gt; m a
</span><a href="System.Console.Haskeline.InputT.html#execInputT"><span class="hs-identifier hs-var hs-var">execInputT</span></a></span></span><span> </span><span id="local-6989586621679097014"><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097014"><span class="hs-identifier hs-var">prefs</span></a></span></span><span> </span><span id="local-6989586621679097013"><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097013"><span class="hs-identifier hs-var">settings</span></a></span></span><span> </span><span id="local-6989586621679097012"><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679097012"><span class="hs-identifier hs-var">run</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span id="local-6989586621679097011"><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
</span><a href="#local-6989586621679097011"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Settings m -&gt; ReaderT (Settings m) m a -&gt; m a
forall r (m :: * -&gt; *) a. r -&gt; ReaderT r m a -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#runReaderT%27"><span class="hs-identifier hs-var">runReaderT'</span></a></span><span> </span><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097013"><span class="hs-identifier hs-var">settings</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT (Settings m) m a -&gt; m a)
-&gt; ReaderT (Settings m) m a -&gt; m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
-&gt; ReaderT (Settings m) m a
forall r (m :: * -&gt; *) a. r -&gt; ReaderT r m a -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#runReaderT%27"><span class="hs-identifier hs-var">runReaderT'</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097014"><span class="hs-identifier hs-var">prefs</span></a></span><span>
</span><span id="line-182"></span><span>            </span><span class="annot"><span class="annottext">(ReaderT Prefs (ReaderT (Settings m) m) a
 -&gt; ReaderT (Settings m) m a)
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
-&gt; ReaderT (Settings m) m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall (m :: * -&gt; *) a.
MonadIO m =&gt;
ReaderT (IORef KillRing) m a -&gt; m a
</span><a href="System.Console.Haskeline.Command.KillRing.html#runKillRing"><span class="hs-identifier hs-var">runKillRing</span></a></span><span>
</span><span id="line-183"></span><span>            </span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
 -&gt; ReaderT Prefs (ReaderT (Settings m) m) a)
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
-&gt; Maybe Int
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall (m :: * -&gt; *) a.
(MonadIO m, MonadMask m) =&gt;
Maybe FilePath -&gt; Maybe Int -&gt; ReaderT (IORef History) m a -&gt; m a
</span><a href="System.Console.Haskeline.Command.History.html#runHistoryFromFile"><span class="hs-identifier hs-var">runHistoryFromFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Settings m -&gt; Maybe FilePath
forall (m :: * -&gt; *). Settings m -&gt; Maybe FilePath
</span><a href="System.Console.Haskeline.InputT.html#historyFile"><span class="hs-identifier hs-var hs-var">historyFile</span></a></span><span> </span><span class="annot"><span class="annottext">Settings m
</span><a href="#local-6989586621679097013"><span class="hs-identifier hs-var">settings</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prefs -&gt; Maybe Int
</span><a href="System.Console.Haskeline.Prefs.html#maxHistorySize"><span class="hs-identifier hs-var hs-var">maxHistorySize</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
</span><a href="#local-6989586621679097014"><span class="hs-identifier hs-var">prefs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span>            </span><span class="annot"><span class="annottext">(ReaderT
   (IORef History)
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   a
 -&gt; ReaderT
      (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; RunTerm
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall r (m :: * -&gt; *) a. ReaderT r m a -&gt; r -&gt; m a
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier hs-var hs-var">runReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
</span><a href="#local-6989586621679097011"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679097012"><span class="hs-identifier hs-var">run</span></a></span><span>
</span><span id="line-185"></span><span>
</span><span id="line-186"></span><span class="hs-comment">-- | Map a user interaction by modifying the base monad computation.</span><span>
</span><span id="line-187"></span><span id="local-6989586621679097563"><span id="local-6989586621679097565"><span class="annot"><a href="System.Console.Haskeline.InputT.html#mapInputT"><span class="hs-identifier hs-type">mapInputT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679097564"><span class="annot"><a href="#local-6989586621679097564"><span class="hs-identifier hs-type">b</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="#local-6989586621679097565"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097564"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679097565"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097564"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097565"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097563"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-type">InputT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097565"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679097563"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-188"></span><span id="mapInputT"><span class="annot"><span class="annottext">mapInputT :: forall (m :: * -&gt; *) a.
(forall b. m b -&gt; m b) -&gt; InputT m a -&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#mapInputT"><span class="hs-identifier hs-var hs-var">mapInputT</span></a></span></span><span> </span><span id="local-6989586621679097005"><span class="annot"><span class="annottext">forall b. m b -&gt; m b
</span><a href="#local-6989586621679097005"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
forall (m :: * -&gt; *) a.
ReaderT
  RunTerm
  (ReaderT
     (IORef History)
     (ReaderT
        (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
  a
-&gt; InputT m a
</span><a href="System.Console.Haskeline.InputT.html#InputT"><span class="hs-identifier hs-var">InputT</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   a
 -&gt; InputT m a)
-&gt; (InputT m a
    -&gt; ReaderT
         RunTerm
         (ReaderT
            (IORef History)
            (ReaderT
               (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
         a)
-&gt; InputT m a
-&gt; InputT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(ReaderT
   (IORef History)
   (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
   a
 -&gt; ReaderT
      (IORef History)
      (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
      a)
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (m :: * -&gt; *) a (n :: * -&gt; *) b r.
(m a -&gt; n b) -&gt; ReaderT r m a -&gt; ReaderT r n b
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier hs-var">mapReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ReaderT
   (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
 -&gt; ReaderT
      (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a)
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
-&gt; ReaderT
     (IORef History)
     (ReaderT (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)))
     a
forall (m :: * -&gt; *) a (n :: * -&gt; *) b r.
(m a -&gt; n b) -&gt; ReaderT r m a -&gt; ReaderT r n b
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier hs-var">mapReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ReaderT Prefs (ReaderT (Settings m) m) a
 -&gt; ReaderT Prefs (ReaderT (Settings m) m) a)
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
-&gt; ReaderT
     (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m)) a
forall (m :: * -&gt; *) a (n :: * -&gt; *) b r.
(m a -&gt; n b) -&gt; ReaderT r m a -&gt; ReaderT r n b
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier hs-var">mapReaderT</span></a></span><span>
</span><span id="line-189"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ReaderT (Settings m) m a -&gt; ReaderT (Settings m) m a)
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
-&gt; ReaderT Prefs (ReaderT (Settings m) m) a
forall (m :: * -&gt; *) a (n :: * -&gt; *) b r.
(m a -&gt; n b) -&gt; ReaderT r m a -&gt; ReaderT r n b
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier hs-var">mapReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(m a -&gt; m a)
-&gt; ReaderT (Settings m) m a -&gt; ReaderT (Settings m) m a
forall (m :: * -&gt; *) a (n :: * -&gt; *) b r.
(m a -&gt; n b) -&gt; ReaderT r m a -&gt; ReaderT r n b
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier hs-var">mapReaderT</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; m a
forall b. m b -&gt; m b
</span><a href="#local-6989586621679097005"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>                    </span><span class="annot"><span class="annottext">(ReaderT
   RunTerm
   (ReaderT
      (IORef History)
      (ReaderT
         (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
   a
 -&gt; ReaderT
      RunTerm
      (ReaderT
         (IORef History)
         (ReaderT
            (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
      a)
-&gt; (InputT m a
    -&gt; ReaderT
         RunTerm
         (ReaderT
            (IORef History)
            (ReaderT
               (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
         a)
-&gt; InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
forall (m :: * -&gt; *) a.
InputT m a
-&gt; ReaderT
     RunTerm
     (ReaderT
        (IORef History)
        (ReaderT
           (IORef KillRing) (ReaderT Prefs (ReaderT (Settings m) m))))
     a
</span><a href="System.Console.Haskeline.InputT.html#unInputT"><span class="hs-identifier hs-var hs-var">unInputT</span></a></span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span class="hs-comment">-- | Read input from 'stdin'.  </span><span>
</span><span id="line-193"></span><span class="hs-comment">-- Use terminal-style interaction if 'stdin' is connected to</span><span>
</span><span id="line-194"></span><span class="hs-comment">-- a terminal and has echoing enabled.  Otherwise (e.g., if 'stdin' is a pipe), use</span><span>
</span><span id="line-195"></span><span class="hs-comment">-- file-style interaction.</span><span>
</span><span id="line-196"></span><span class="hs-comment">--</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- This behavior should suffice for most applications.  </span><span>
</span><span id="line-198"></span><span class="annot"><a href="System.Console.Haskeline.InputT.html#defaultBehavior"><span class="hs-identifier hs-type">defaultBehavior</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span>
</span><span id="line-199"></span><span id="defaultBehavior"><span class="annot"><span class="annottext">defaultBehavior :: Behavior
</span><a href="System.Console.Haskeline.InputT.html#defaultBehavior"><span class="hs-identifier hs-var hs-var">defaultBehavior</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO RunTerm -&gt; Behavior
</span><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-var">Behavior</span></a></span><span> </span><span class="annot"><span class="annottext">IO RunTerm
</span><a href="System.Console.Haskeline.Backend.html#defaultRunTerm"><span class="hs-identifier hs-var">defaultRunTerm</span></a></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- | Use file-style interaction, reading input from the given 'Handle'.  </span><span>
</span><span id="line-202"></span><span class="annot"><a href="System.Console.Haskeline.InputT.html#useFileHandle"><span class="hs-identifier hs-type">useFileHandle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span>
</span><span id="line-203"></span><span id="useFileHandle"><span class="annot"><span class="annottext">useFileHandle :: Handle -&gt; Behavior
</span><a href="System.Console.Haskeline.InputT.html#useFileHandle"><span class="hs-identifier hs-var hs-var">useFileHandle</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO RunTerm -&gt; Behavior
</span><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-var">Behavior</span></a></span><span> </span><span class="annot"><span class="annottext">(IO RunTerm -&gt; Behavior)
-&gt; (Handle -&gt; IO RunTerm) -&gt; Handle -&gt; Behavior
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO RunTerm
</span><a href="System.Console.Haskeline.Backend.html#fileHandleRunTerm"><span class="hs-identifier hs-var">fileHandleRunTerm</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-comment">-- | Use file-style interaction, reading input from the given file.</span><span>
</span><span id="line-206"></span><span class="annot"><a href="System.Console.Haskeline.InputT.html#useFile"><span class="hs-identifier hs-type">useFile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span>
</span><span id="line-207"></span><span id="useFile"><span class="annot"><span class="annottext">useFile :: FilePath -&gt; Behavior
</span><a href="System.Console.Haskeline.InputT.html#useFile"><span class="hs-identifier hs-var hs-var">useFile</span></a></span></span><span> </span><span id="local-6989586621679096999"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679096999"><span class="hs-identifier hs-var">file</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO RunTerm -&gt; Behavior
</span><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-var">Behavior</span></a></span><span> </span><span class="annot"><span class="annottext">(IO RunTerm -&gt; Behavior) -&gt; IO RunTerm -&gt; Behavior
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-208"></span><span>            </span><span id="local-6989586621679096998"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679096998"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IOMode -&gt; IO Handle
</span><a href="../../base/src/GHC.IO.StdHandles.html#openBinaryFile"><span class="hs-identifier hs-var">openBinaryFile</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679096999"><span class="hs-identifier hs-var">file</span></a></span><span> </span><span class="annot"><span class="annottext">IOMode
</span><a href="../../base/src/GHC.IO.IOMode.html#ReadMode"><span class="hs-identifier hs-var">ReadMode</span></a></span><span>
</span><span id="line-209"></span><span>            </span><span id="local-6989586621679096995"><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679096995"><span class="hs-identifier hs-var">rt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO RunTerm
</span><a href="System.Console.Haskeline.Backend.html#fileHandleRunTerm"><span class="hs-identifier hs-var">fileHandleRunTerm</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679096998"><span class="hs-identifier hs-var">h</span></a></span><span>
</span><span id="line-210"></span><span>            </span><span class="annot"><span class="annottext">RunTerm -&gt; IO RunTerm
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679096995"><span class="hs-identifier hs-var">rt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">closeTerm :: IO ()
</span><a href="System.Console.Haskeline.Term.html#closeTerm"><span class="hs-identifier hs-var">closeTerm</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RunTerm -&gt; IO ()
</span><a href="System.Console.Haskeline.Term.html#closeTerm"><span class="hs-identifier hs-var hs-var">closeTerm</span></a></span><span> </span><span class="annot"><span class="annottext">RunTerm
</span><a href="#local-6989586621679096995"><span class="hs-identifier hs-var">rt</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO () -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier hs-var">hClose</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679096998"><span class="hs-identifier hs-var">h</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span class="hs-comment">-- | Use terminal-style interaction whenever possible, even if 'stdin' and/or 'stdout' are not</span><span>
</span><span id="line-213"></span><span class="hs-comment">-- terminals.</span><span>
</span><span id="line-214"></span><span class="hs-comment">--</span><span>
</span><span id="line-215"></span><span class="hs-comment">-- If it cannot open the user's terminal, use file-style interaction, reading input from 'stdin'.</span><span>
</span><span id="line-216"></span><span class="annot"><a href="System.Console.Haskeline.InputT.html#preferTerm"><span class="hs-identifier hs-type">preferTerm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-type">Behavior</span></a></span><span>
</span><span id="line-217"></span><span id="preferTerm"><span class="annot"><span class="annottext">preferTerm :: Behavior
</span><a href="System.Console.Haskeline.InputT.html#preferTerm"><span class="hs-identifier hs-var hs-var">preferTerm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO RunTerm -&gt; Behavior
</span><a href="System.Console.Haskeline.InputT.html#Behavior"><span class="hs-identifier hs-var">Behavior</span></a></span><span> </span><span class="annot"><span class="annottext">IO RunTerm
</span><a href="System.Console.Haskeline.Backend.html#terminalRunTerm"><span class="hs-identifier hs-var">terminalRunTerm</span></a></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-comment">-- | Read 'Prefs' from @~/.haskeline.@   If there is an error reading the file,</span><span>
</span><span id="line-221"></span><span class="hs-comment">-- the 'defaultPrefs' will be returned.</span><span>
</span><span id="line-222"></span><span class="annot"><a href="System.Console.Haskeline.InputT.html#readPrefsFromHome"><span class="hs-identifier hs-type">readPrefsFromHome</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Prefs.html#Prefs"><span class="hs-identifier hs-type">Prefs</span></a></span><span>
</span><span id="line-223"></span><span id="readPrefsFromHome"><span class="annot"><span class="annottext">readPrefsFromHome :: IO Prefs
</span><a href="System.Console.Haskeline.InputT.html#readPrefsFromHome"><span class="hs-identifier hs-var hs-var">readPrefsFromHome</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IOException -&gt; IO Prefs) -&gt; IO Prefs -&gt; IO Prefs
forall (m :: * -&gt; *) e a.
(MonadCatch m, Exception e) =&gt;
(e -&gt; m a) -&gt; m a -&gt; m a
</span><a href="../../exceptions/src/Control.Monad.Catch.html#handle"><span class="hs-identifier hs-var">handle</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><span class="annottext">IOException
</span><span class="hs-identifier">_</span></span><span class="hs-glyph">::</span><span class="annot"><a href="../../base/src/GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Prefs -&gt; IO Prefs
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Prefs
</span><a href="System.Console.Haskeline.Prefs.html#defaultPrefs"><span class="hs-identifier hs-var">defaultPrefs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO Prefs -&gt; IO Prefs) -&gt; IO Prefs -&gt; IO Prefs
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-224"></span><span>    </span><span id="local-6989586621679096990"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679096990"><span class="hs-identifier hs-var">home</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO FilePath
</span><a href="../../directory/src/System.Directory.html#getHomeDirectory"><span class="hs-identifier hs-var">getHomeDirectory</span></a></span><span>
</span><span id="line-225"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; IO Prefs
</span><a href="System.Console.Haskeline.Prefs.html#readPrefs"><span class="hs-identifier hs-var">readPrefs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679096990"><span class="hs-identifier hs-var">home</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;.haskeline&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span></pre></body></html>